package com.financing.wap.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.financing.wap.dao.IMessageDao;
import com.financing.wap.dto.MessageDTO;
import com.financing.wap.dto.MessageMailDTO;
import com.financing.wap.dto.MessageSmsDTO;
import com.financing.wap.service.IMessageService;
import com.financing.wap.vo.MessageVO;

@Service("messageService")
public class MessageServiceImpl implements IMessageService{

	@Autowired
	private IMessageDao messageDao;


	@Override
	public List<MessageDTO> getMessageList(MessageVO msg) {
		
		return messageDao.getMessageList(msg);
	}

	@Override
	public MessageDTO getMessageView(Map<String,Object> paramsMap) {
		
		return messageDao.getMessageView(paramsMap);
	}
	
	@Override
	public int updateMessageStatus(MessageDTO dto) {
		
		return messageDao.updateMessageStatus(dto);
	}

	@Override
	public Integer getMessageCount(MessageVO msg) {
		return messageDao.getMessageCount(msg);
	}

	@Override
	public int addMessageSms(MessageSmsDTO messageSmsDTO) {
		int id = messageDao.addMessageSms(messageSmsDTO);
		return id;
	}

	@Override
	public int insertMailInfo(MessageMailDTO mail) {
		 
		return messageDao.insertMailInfo(mail);
	}

}
